package com.dhcc.DRGsHosp.facade.impl.assembler;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import com.dhcc.DRGsHosp.core.domain.IndexCal;
import com.dhcc.DRGsHosp.facade.dto.IndexCalDTO;
/**
 * 
 * @ClassName: IndexCalAssembler  
 * @Description ：    实体与dto的转化
 * @Date: 2017年5月25日 上午11:40:09  
 * @Author LiuHongJun 
 * @Version 2.5.0 DHC-DRGs
 */
public class IndexCalAssembler {
	
	public static IndexCalDTO  toDTO(IndexCal  indexCal){
		if (indexCal == null) {
			return null;
		}
	        	IndexCalDTO indexCalDto  = new IndexCalDTO();
	    	    indexCalDto.setMrId (indexCal.getMrId());
     	    	indexCalDto.setPardepCode (indexCal.getPardepCode());
     	    	indexCalDto.setPardrgCode (indexCal.getPardrgCode());
     	    	indexCalDto.setPardepgroupCode (indexCal.getPardepgroupCode());
     	    	indexCalDto.setPargroupName (indexCal.getPargroupName());
     	    	indexCalDto.setParmdcCode (indexCal.getParmdcCode());
     	    	indexCalDto.setParadrgCode (indexCal.getParadrgCode());
     	    	indexCalDto.setVerCode (indexCal.getVerCode());
     	    	indexCalDto.setProtomedicus(indexCal.getProtomedicus());
     	    	indexCalDto.setParwardCode(indexCal.getParwardCode());
     	    	indexCalDto.setMsCode(indexCal.getMsCode());
     	    	indexCalDto.setpType(indexCal.getpType());
     	    	indexCalDto.setgType(indexCal.getgType());
     	    	indexCalDto.setMonitorType(indexCal.getMonitorType());
     	    	indexCalDto.setQuotaCode(indexCal.getQuotaCode());
     	    	indexCalDto.setDateFrom(indexCal.getDateFrom());
     	    	indexCalDto.setDateTo(indexCal.getDateTo());
     	    	indexCalDto.setManageYear(indexCal.getManageYear());
     	    	indexCalDto.setDeps(indexCal.getDeps());
     	    	indexCalDto.setMdcs(indexCal.getMdcs());
     	    	indexCalDto.setSpecCode(indexCal.getSpecCode());
     	    	indexCalDto.setIsHistory(indexCal.getIsHistory());
     	    	indexCalDto.setPhysician(indexCal.getPhysician());
     	    	indexCalDto.setIsKeyDisGroup(indexCal.getIsKeyDisGroup());
     	    	indexCalDto.setIsDifDisGroup(indexCal.getIsDifDisGroup());//是否疑难病组
     	    	indexCalDto.setGroupType(indexCal.getGroupType());
     	    	indexCalDto.setSqlStr(indexCal.getSqlStr());
     	    	indexCalDto.setStdYear(indexCal.getStdYear());
     	    	indexCalDto.setPhysician(indexCal.getPhysician());
     	    	indexCalDto.setResident(indexCal.getResident());
     	    	indexCalDto.setCompareType(indexCal.getCompareType());
     	    	indexCalDto.setMrType(indexCal.getMrType());
     	    	indexCalDto.setIsGetCc(indexCal.getIsGetCc());
     	    	indexCalDto.setType1(indexCal.getType1());
     	    	indexCalDto.setType2(indexCal.getType2());
     	    	indexCalDto.setType3(indexCal.getType3());
     	    	indexCalDto.setTypeOne(indexCal.getTypeOne());
     	    	indexCalDto.setTypeTwo(indexCal.getTypeTwo());
     	    	indexCalDto.setTypeThree(indexCal.getTypeThree());
     	    	indexCalDto.setTypeFour(indexCal.getTypeFour());
     	    	indexCalDto.setIsPerf(indexCal.getIsPerf());
     	    	indexCalDto.setMsType(indexCal.getMsType());
     	    	indexCalDto.setHcType(indexCal.getHcType());
     	    	indexCalDto.setScoreConfig(indexCal.getScoreConfig());
     	    	indexCalDto.setGroupByTime(indexCal.getGroupByTime());
     	    	indexCalDto.setIsPayGroup(indexCal.getIsPayGroup());
     	    	indexCalDto.setSpecHeader(indexCal.getSpecHeader());
     	    	indexCalDto.setRoleName(indexCal.getRoleName());
     	    	indexCalDto.setUserCode(indexCal.getUserCode());
     	    	indexCalDto.setDoctorCode(indexCal.getDoctorCode());
     	    	indexCalDto.setStdId(indexCal.getStdId());
     	    	indexCalDto.setVerRegion(indexCal.getVerRegion());
     	    	indexCalDto.setHospCode(indexCal.getHospCode());
     	    	indexCalDto.setOpeLevel(indexCal.getOpeLevel());
     	    	indexCalDto.setForecastYear(indexCal.getForecastYear());
     	       return indexCalDto;
	 }
	
	public static List<IndexCalDTO>  toDTOs(Collection<IndexCal>  indexCal){
		if (indexCal == null) {
			return null;
		}
		List<IndexCalDTO> indexCalDto = new ArrayList<IndexCalDTO>();
		for (IndexCal each : indexCal) {
			indexCalDto.add(toDTO(each));
		}
		return indexCalDto;
	}
	
	 public static IndexCal  toEntity(IndexCalDTO  indexCalDTO){
	 	if (indexCalDTO == null) {
			return null;
		}
	 	    IndexCal indexCal  = new IndexCal();
	        indexCal.setMrId (indexCalDTO.getMrId());
	    	indexCal.setPardepCode (indexCalDTO.getPardepCode());
	    	indexCal.setPardrgCode (indexCalDTO.getPardrgCode());
	    	indexCal.setPardepgroupCode (indexCalDTO.getPardepgroupCode());
	    	indexCal.setPargroupName (indexCalDTO.getPargroupName());
	    	indexCal.setParmdcCode (indexCalDTO.getParmdcCode());
	    	indexCal.setParadrgCode (indexCalDTO.getParadrgCode());
	    	indexCal.setVerCode (indexCalDTO.getVerCode());
	    	indexCal.setProtomedicus(indexCalDTO.getProtomedicus());
	    	indexCal.setParwardCode(indexCalDTO.getParwardCode());
	    	indexCal.setMsCode(indexCalDTO.getMsCode());
	    	indexCal.setpType(indexCalDTO.getpType());
	    	indexCal.setgType(indexCalDTO.getgType());
	    	indexCal.setMonitorType(indexCalDTO.getMonitorType());
	    	indexCal.setQuotaCode(indexCalDTO.getQuotaCode());
	    	indexCal.setDateFrom(indexCalDTO.getDateFrom());
	    	indexCal.setDateTo(indexCalDTO.getDateTo());
	    	indexCal.setManageYear(indexCalDTO.getManageYear());
	    	indexCal.setDeps(indexCalDTO.getDeps());
	    	indexCal.setMdcs(indexCalDTO.getMdcs());
	    	indexCal.setSpecCode(indexCalDTO.getSpecCode());
	    	indexCal.setIsHistory(indexCalDTO.getIsHistory());
	    	indexCal.setPhysician(indexCalDTO.getPhysician());
	    	indexCal.setIsKeyDisGroup(indexCalDTO.getIsKeyDisGroup());
 	    	indexCal.setIsDifDisGroup(indexCalDTO.getIsDifDisGroup());//是否疑难病组
	    	indexCal.setGroupType(indexCalDTO.getGroupType());
	    	indexCal.setSqlStr(indexCalDTO.getSqlStr());
	    	indexCal.setStdYear(indexCalDTO.getStdYear());
	    	indexCal.setPhysician(indexCalDTO.getPhysician());
	    	indexCal.setResident(indexCalDTO.getResident());
	    	indexCal.setCompareType(indexCalDTO.getCompareType());
	    	indexCal.setMrType(indexCalDTO.getMrType());
	    	indexCal.setIsGetCc(indexCalDTO.getIsGetCc());
	    	indexCal.setType1(indexCalDTO.getType1());
 	    	indexCal.setType2(indexCalDTO.getType2());
 	    	indexCal.setType3(indexCalDTO.getType3());
	    	indexCal.setTypeOne(indexCalDTO.getTypeOne());
	    	indexCal.setTypeTwo(indexCalDTO.getTypeTwo());
	    	indexCal.setTypeThree(indexCalDTO.getTypeThree());
	    	indexCal.setTypeFour(indexCalDTO.getTypeFour());
	    	indexCal.setIsPerf(indexCalDTO.getIsPerf());
	    	indexCal.setMsType(indexCalDTO.getMsType());
	    	indexCal.setHcType(indexCalDTO.getHcType());
	    	indexCal.setScoreConfig(indexCalDTO.getScoreConfig());
	    	indexCal.setGroupByTime(indexCalDTO.getGroupByTime());
	    	indexCal.setIsPayGroup(indexCalDTO.getIsPayGroup());
	    	indexCal.setSpecHeader(indexCalDTO.getSpecHeader());
	    	indexCal.setRoleName(indexCalDTO.getRoleName());
	    	indexCal.setUserCode(indexCalDTO.getUserCode());
	    	indexCal.setDoctorCode(indexCalDTO.getDoctorCode());
	    	indexCal.setStdId(indexCalDTO.getStdId());
	    	indexCal.setVerRegion(indexCalDTO.getVerRegion());
	    	indexCal.setHospCode(indexCalDTO.getHospCode());
	    	indexCal.setOpeLevel(indexCalDTO.getOpeLevel());
	    	indexCal.setForecastYear(indexCalDTO.getForecastYear());
 	  	return indexCal;
	 }
	
	public static List<IndexCal> toEntities(Collection<IndexCalDTO> indexCalDTOs) {
		if (indexCalDTOs == null) {
			return null;
		}
		
		List<IndexCal> indexCal = new ArrayList<IndexCal>();
		for (IndexCalDTO each : indexCalDTOs) {
			indexCal.add(toEntity(each));
		}
		return indexCal;
	}
}
